import { CAR_TRACK_INFORMATION, VEHICLE_TABLE_ASSOCIATION, GETVEHICLETRACE, GEPARKINGPOINT, GET_CAR_CODE } from './api'
import { METHOD, request } from '@/utils/request'
const TIME_OUT = 20000

/**
 * 获取所有车辆轨迹回放信息
 * @param 分页
 * @returns {Promise<AxiosResponse<T>}
 */
export async function getTrackInformation(params) {
    return request(CAR_TRACK_INFORMATION, METHOD.POST, params, {timeout: TIME_OUT})
}
// 轨迹点数据
export async function getVehicleTrace(params) {
    return request(GETVEHICLETRACE, METHOD.POST, params, {timeout: TIME_OUT})
}
// 停车分析点数据
export async function getParkingAnalysis(params) {
    return request(GEPARKINGPOINT, METHOD.POST, params, {timeout: TIME_OUT})
}
export async function carNumAassociation(params) {
    return request(`${VEHICLE_TABLE_ASSOCIATION}/${params}`, METHOD.GET)
}
// 获取车架号
export async function getCarCode(params) {
    return request(GET_CAR_CODE, METHOD.POST, {carCode: params, propertyCode: "setting_asset_list"}, {timeout: TIME_OUT})
}